package com.sztx.pay.center.common.util;

import java.util.List;

import com.sztx.pay.center.common.util.Constance.UserType;

public class CommonUtil {
	
	
	public static boolean isValidateUserType(Integer userType){		
		boolean flag = false;
		
		if (userType == null) {
			return flag;
		}
		
		flag = (UserType.SZTX.getCode() & userType ) == UserType.SZTX.getCode();
		if (!flag) {
			return flag;
		}
		
		List<UserType> oldUserTypeList = UserType.listOf(userType);
		if (oldUserTypeList == null || oldUserTypeList.isEmpty()) {
			return flag;
		}
		
		
		
		
		
		
		return flag;
		
		
		
	}
	
	public static boolean isValidateUserType(Integer oldUserType,Integer newUserType){
		
		boolean flag = false;
		
		if (oldUserType == null || newUserType == null) {
			return flag;
		}
		
		List<UserType> oldUserTypeList = UserType.listOf(oldUserType);
		if (oldUserTypeList == null || oldUserTypeList.isEmpty()) {
			return flag;
		}
		
		List<UserType> newUserTypeList = UserType.listOf(newUserType);
		if (newUserTypeList == null || newUserTypeList.isEmpty()) {
			return flag;
		}
		
		
		
		
		
		
		
		
		return flag;
	}
	
	

}
